﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace DRSLF_robot_
{
    public class Motor
    {
        public int MotorDist;
        public int MotorLong;
        public int MotorPlace;

        public Motor(int motorDist, int motorLong,int motorPlace)
        {
            MotorDist = motorDist;
            MotorLong = motorLong;
            MotorPlace = motorPlace;
        }

        public Bitmap returnMotorImage()
        {
            Bitmap bmiMot = new Bitmap(250, 250);
            Graphics g = Graphics.FromImage(bmiMot);
            g.DrawRectangle(new Pen(Color.Blue), (int)(121 - (MotorDist * 0.5)), (int)(MotorPlace - (MotorLong / 2)), 5, MotorLong);
            g.DrawRectangle(new Pen(Color.Blue), (int)(121 + (MotorDist * 0.5)), (int)(MotorPlace - (MotorLong / 2)), 5, MotorLong);
            return bmiMot;
        }
    }
}
